package wordroid.database;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class SqlHelper
{
  public static String ATTENTION_TABLE;
  public static String BOOKLIST_TABLE = "BOOKS";
  public static final String DB_NAME = "data/data/wordroid.model/databases/wordroid.db";
  public static String WORDLIST_TABLE = "PLAN";

  static
  {
    ATTENTION_TABLE = "ATTENTION";
  }

  public void CreateTable(Context paramContext, String paramString)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    String str = "CREATE TABLE " + paramString + " ( ID text not null, SPELLING text not null , MEANNING text not null, PHONETIC_ALPHABET text, LIST text not null" + ");";
    try
    {
      localSQLiteDatabase.execSQL(str);
      Log.i("wordroid=", str);
      localSQLiteDatabase.close();
      return;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
  }

  public void Delete(Context paramContext, String paramString1, String paramString2, String[] paramArrayOfString)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    try
    {
      localSQLiteDatabase.delete(paramString1, paramString2, paramArrayOfString);
      Log.i("wordroid=", "delete");
      localSQLiteDatabase.close();
      return;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
  }

  public void DeleteTable(Context paramContext, String paramString)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    String str = "drop table " + paramString;
    try
    {
      localSQLiteDatabase.execSQL(str);
      Log.i("wordroid=", str);
      localSQLiteDatabase.close();
      return;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
  }

  public void Insert(Context paramContext, String paramString, ContentValues paramContentValues)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    try
    {
      localSQLiteDatabase.insert(paramString, null, paramContentValues);
      Log.i("wordroid=", "Insert");
      localSQLiteDatabase.close();
      return;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
  }

  public Cursor Query(Context paramContext, String paramString1, String[] paramArrayOfString1, String paramString2, String[] paramArrayOfString2, String paramString3, String paramString4, String paramString5)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    Cursor localCursor = null;
    try
    {
      localCursor = localSQLiteDatabase.query(paramString1, paramArrayOfString1, paramString2, paramArrayOfString2, paramString3, paramString4, paramString5);
      Log.i("wordroid=", "query");
     // Log.i("countofcursor=", localCursor.getCount());
      localSQLiteDatabase.close();
      return localCursor;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
	return localCursor;
  }

  public void Update(Context paramContext, String paramString1, ContentValues paramContentValues, String paramString2, String[] paramArrayOfString)
  {
    SQLiteDatabase localSQLiteDatabase = SQLiteDatabase.openOrCreateDatabase("data/data/wordroid.model/databases/wordroid.db", null);
    try
    {
      localSQLiteDatabase.update(paramString1, paramContentValues, paramString2, paramArrayOfString);
      Log.i("wordroid=", "Update");
      localSQLiteDatabase.close();
      return;
    }
    catch (Exception localException)
    {
      localException.getStackTrace();
    }
  }
}

/* Location:           E:\Desktop\Android\英语词汇记忆\classes_dex2jar.jar
 * Qualified Name:     wordroid.database.SqlHelper
 * JD-Core Version:    0.5.3
 */